package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/11/17.
 */
@Entity
@Table(name = "topic_product")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class TopicProduct extends IDEntityMall {

    @Column(columnDefinition = "bigint(20) comment '专题ID'")
    private Long topicId;

    @Column(columnDefinition = "bigint(20) comment '产品ID'")
    private Long productId;

    @Column(columnDefinition = "int(20) comment '序号(排序字段)'")
    private Integer seqNo;


    @Column(columnDefinition = "varchar(255) comment '名称'")
    private String name;

    public Long getTopicId() {
        return topicId;
    }

    public void setTopicId(Long topicId) {
        this.topicId = topicId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Integer getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(Integer seqNo) {
        this.seqNo = seqNo;
    }

    @Override
    public String toString() {
        return "TopicProduct{" +
                "topicId=" + topicId +
                ", productId=" + productId +
                ", seqNo=" + seqNo +
                ", name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
